﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace Tmp.Wcf.Config
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "addCar" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select addCar.svc or addCar.svc.cs at the Solution Explorer and start debugging.
    public class addCar : IaddCar
    {
        public IEnumerable<CAddCar> SelectAll()
        {
            try
            {
                using (var context = new DbHwTmp())
                {
                 var CAddCars = from m in context.CAddCars
                        select m;

                 var x = CAddCars.ToList();
                    return x;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
